-- GENERATED SPELL FOR [Fiend of Air] --


function spell0_30045(pUnit, Event) --@Hurricane,n/a--
pUnit:FullCastSpellOnTarget(55881,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30045', 10000, 1)
end

function spell1_30045(pUnit, Event) --@Orb of Storms,n/a--
pUnit:FullCastSpellOnTarget(55882,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30045', 2000, 1)
end

function Sorts_30045(pUnit, Event)
local choix_sorts_30045 = math.random(0, 1)
if choix_sorts_30045 == 0 then
pUnit:RegisterEvent('spell0_30045', 1, 1)
end
if choix_sorts_30045 == 1 then
pUnit:RegisterEvent('spell1_30045', 1, 1)
end
end

function mob30045_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30045', math.random(1500, 3000), 1)
end

function mob30045_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30045_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30045_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30045, 1, 'mob30045_Action')
RegisterUnitEvent(30045, 2, 'mob30045_Leave')
RegisterUnitEvent(30045, 3, 'mob30045_Kill')
RegisterUnitEvent(30045, 4, 'mob30045_Die')
